package a.e.b.a;

import a.e.b.c.s;
import a.j.*;
import a.j.wb;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import javax.imageio.ImageIO;
import javax.imageio.ImageWriter;
import javax.imageio.stream.ImageOutputStream;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.*;
import java.util.List;

public class lb
  extends a.e.b.g
{
  static final String j = "y.io.graphml.graph2d.Graph2DConstants.YFILES_EXT_NS";
  private List q = new LinkedList();
  private List r = new LinkedList();
  static Class s;
  static Class t;
  static Class u;
  static Class v;
  static Class w;
  static Class x;
  static Class y;
  static Class z;
  static Class A;
  static Class B;
  static Class C;
  static Class D;
  static Class E;
  public static boolean F;
  
  protected void b(a.c.q paramq, a.e.b.c.p paramp)
  {
    boolean bool = i.i;
    super.b(paramq, paramp);
    a.e.b.c.r localr = h(paramq, paramp);
    if (localr != null)
    {
      if (!bool) {}
      paramp.a(s == null ? (lb.s = a("a.e.b.c.r")) : s, localr);
    }
    if (!bool) {}
    paramp.a(t == null ? (lb.t = a("a.e.b.a.kb")) : t, new db_(null));
    if (!bool) {}
    paramp.a(u == null ? (lb.u = a("a.e.b.l")) : u, new cb_(null));
  }
  
  protected a.e.b.c.r h(a.c.q paramq, a.e.b.c.p paramp)
  {
    if ((i.i) || ((paramq instanceof a.j.g)))
    {
      a.j.a.j localj = a.j.a.j.a(paramq);
      if (localj != null) {
        return new ab(localj, paramq);
      }
    }
    return null;
  }
  
  public lb()
  {
    n();
    m();
    l();
  }
  
  protected void d(a.c.q paramq, a.e.b.b.u paramu)
  {
    super.d(paramq, paramu);
    if (!i.i)
    {
      if ((paramq instanceof a.j.g))
      {
        paramu.a(d());
        paramu.a(e());
        paramu.a(f());
        paramu.a(c());
      }
      paramu.a(g());
    }
  }
  
  protected a.e.b.b.w c()
  {
    new a.e.b.b.w()
    {
      public void a(a.e.b.b.eb paramAnonymouseb)
      {
        boolean bool = i.i;
        ob localob = new ob();
        if ((bool) || ((!paramAnonymouseb.b()) && (localob.a(paramAnonymouseb.a())))) {
          paramAnonymouseb.a(localob);
        }
        nb localnb = new nb();
        if ((bool) || ((!paramAnonymouseb.b()) && (localnb.a(paramAnonymouseb.a())))) {
          paramAnonymouseb.a(localnb);
        }
        pb localpb = new pb();
        if ((bool) || ((!paramAnonymouseb.b()) && (localpb.a(paramAnonymouseb.a())))) {
          paramAnonymouseb.a(localpb);
        }
      }
    };
  }
  
  protected a.e.b.b.w d()
  {
    new a.e.b.b.w()
    {
      public void a(a.e.b.b.eb paramAnonymouseb)
      {
        boolean bool = i.i;
        Element localElement = paramAnonymouseb.a();
        hb localhb = new hb();
        if (((bool) || (!paramAnonymouseb.b())) && ((bool) || ((a.e.b.g.a(localElement, a.e.b.i.e)) && (localhb.a(localElement.getAttributes()))))) {
          paramAnonymouseb.a(localhb);
        }
      }
    };
  }
  
  protected a.e.b.b.w e()
  {
    new a.e.b.b.w()
    {
      public void a(a.e.b.b.eb paramAnonymouseb)
      {
        Element localElement = paramAnonymouseb.a();
        qb localqb = new qb();
        if ((i.i) || ((!paramAnonymouseb.b()) && (localqb.a(localElement)))) {
          paramAnonymouseb.a(localqb);
        }
      }
    };
  }
  
  protected a.e.b.b.w f()
  {
    new a.e.b.b.w()
    {
      public void a(a.e.b.b.eb paramAnonymouseb)
      {
        Element localElement = paramAnonymouseb.a();
        rb localrb = new rb();
        if ((i.i) || ((!paramAnonymouseb.b()) && (localrb.a(localElement)))) {
          paramAnonymouseb.a(localrb);
        }
      }
    };
  }
  
  protected a.e.b.b.w g()
  {
    new a.e.b.b.w()
    {
      public void a(a.e.b.b.eb paramAnonymouseb)
      {
        Element localElement = paramAnonymouseb.a();
        lb.z_ localz_ = new lb.z_(null);
        if ((i.i) || ((!paramAnonymouseb.b()) && (localz_.a(localElement)))) {
          paramAnonymouseb.a(localz_);
        }
      }
    };
  }
  
  protected void e(a.c.q paramq, a.e.b.c.p paramp)
  {
    super.e(paramq, paramp);
    if (!i.i)
    {
      if ((paramq instanceof a.j.g))
      {
        paramp.a(k());
        paramp.a(j());
        paramp.a(i());
      }
      paramp.a(h());
    }
  }
  
  protected a.e.b.c.t h()
  {
    new a.e.b.c.t()
    {
      public void a(a.e.b.c.db paramAnonymousdb)
      {
        if (!i.i) {}
        if (paramAnonymousdb.a().a(lb.t == null ? (lb.t = lb.a("a.e.b.a.kb")) : lb.t) != null) {
          paramAnonymousdb.a(new lb.bb_(null), a.e.b.i.g);
        }
      }
    };
  }
  
  protected a.e.b.c.t i()
  {
    new a.e.b.c.t()
    {
      public void a(a.e.b.c.db paramAnonymousdb)
      {
        paramAnonymousdb.a(new ub(), a.e.b.i.f);
        paramAnonymousdb.a(new tb(), a.e.b.i.f);
        paramAnonymousdb.a(new vb(), a.e.b.i.f);
      }
    };
  }
  
  protected a.e.b.c.t j()
  {
    new a.e.b.c.t()
    {
      public void a(a.e.b.c.db paramAnonymousdb)
      {
        paramAnonymousdb.a(new xb(), a.e.b.i.d);
      }
    };
  }
  
  protected a.e.b.c.t k()
  {
    new a.e.b.c.t()
    {
      public void a(a.e.b.c.db paramAnonymousdb)
      {
        paramAnonymousdb.a(new yb(), a.e.b.i.c);
      }
    };
  }
  
  private void l()
  {
    super.a(new rd.b_());
    super.a(new bb());
    super.a(new bb.d_());
    super.a(new u());
    super.a(new u.e_());
    super.a(new u.f_());
    super.a(new u.g_());
    super.a(new u.d_());
    super.a(new l.b_());
    super.a(new ce.b_());
    super.a(new a.j.bb.d_());
    super.a(new a.e.b.b.n()
    {
      public void a(a.e.b.b.cb paramAnonymouscb)
        throws a.e.b.b.a
      {
        boolean bool = i.i;
        a.e.b.b.t localt = paramAnonymouscb.d();
        Node localNode = paramAnonymouscb.e();
        a.e.b.b.j localj = new a.e.b.b.j(localt);
        j localj1 = j.e();
        if (!bool) {}
        if (paramAnonymouscb.a() == (lb.v == null ? (lb.v = lb.a("a.j.ld")) : lb.v)) {}
        if ((bool) || ((y.a(localt, "y.io.graphml.input.DeserializationProperties.IGNORE_UNKNOWN_REALIZERS")) || ((bool) || (localj1.a(localNode, localj)))))
        {
          ld localld = localj1.b(localNode, localj);
          Object localObject = localt.b();
          a.c.q localq = localt.d();
          if (!bool)
          {
            if ((!y.a(localj, i.a)) && ((bool) || (((localObject instanceof a.c.e)) && ((bool) || ((localq instanceof a.j.g))))))
            {
              a.c.e locale = (a.c.e)localObject;
              a.j.g localg = (a.j.g)localq;
              localg.a(locale, localld);
            }
            localj1.a(localld, localNode, localj);
          }
          paramAnonymouscb.a(localld);
        }
      }
    });
    super.a(new a.e.b.b.n()
    {
      public void a(a.e.b.b.cb paramAnonymouscb)
        throws a.e.b.b.a
      {
        boolean bool = i.i;
        a.e.b.b.t localt = paramAnonymouscb.d();
        Node localNode = paramAnonymouscb.e();
        a.e.b.b.j localj = new a.e.b.b.j(localt);
        d locald = d.e();
        if (!bool) {}
        if (paramAnonymouscb.a() == (lb.w == null ? (lb.w = lb.a("a.j.tb")) : lb.w)) {}
        if ((bool) || ((y.a(localt, "y.io.graphml.input.DeserializationProperties.IGNORE_UNKNOWN_REALIZERS")) || ((bool) || (locald.a(localNode, localj)))))
        {
          a.j.tb localtb = locald.b(localNode, localj);
          Object localObject = localt.b();
          a.c.q localq = localt.d();
          if (!bool)
          {
            if ((!y.a(localj, a.a)) && ((bool) || (((localObject instanceof a.c.d)) && ((bool) || ((localq instanceof a.j.g))))))
            {
              a.c.d locald1 = (a.c.d)localObject;
              a.j.g localg = (a.j.g)localq;
              localg.a(locald1, localtb);
            }
            locald.a(localtb, localNode, localj);
          }
          paramAnonymouscb.a(localtb);
        }
      }
    });
    super.a(new a.e.b.b.n()
    {
      public void a(a.e.b.b.cb paramAnonymouscb)
        throws a.e.b.b.a
      {
        boolean bool = i.i;
        a.e.b.b.t localt = paramAnonymouscb.d();
        Node localNode = paramAnonymouscb.e();
        a.e.b.b.j localj = new a.e.b.b.j(localt);
        Iterator localIterator = lb.this.q.iterator();
        while (localIterator.hasNext())
        {
          eb localeb = (eb)localIterator.next();
          if (localeb.a(localNode, localj))
          {
            ld localld = localeb.b(localNode, localj);
            Object localObject = localt.b();
            a.c.q localq = localt.d();
            if (!bool)
            {
              if ((!y.a(localj, i.a)) && ((bool) || (((localObject instanceof a.c.e)) && ((bool) || ((localq instanceof a.j.g))))))
              {
                a.c.e locale = (a.c.e)localObject;
                a.j.g localg = (a.j.g)localq;
                localg.a(locale, localld);
              }
              localeb.a(localld, localNode, localj);
              paramAnonymouscb.a(localld);
            }
          }
        }
      }
    });
    super.a(new a.e.b.b.n()
    {
      public void a(a.e.b.b.cb paramAnonymouscb)
        throws a.e.b.b.a
      {
        boolean bool = i.i;
        a.e.b.b.t localt = paramAnonymouscb.d();
        Node localNode = paramAnonymouscb.e();
        a.e.b.b.j localj = new a.e.b.b.j(localt);
        Iterator localIterator = lb.this.r.iterator();
        while (localIterator.hasNext())
        {
          w localw = (w)localIterator.next();
          if (localw.a(localNode, localj))
          {
            a.j.tb localtb = localw.b(localNode, localj);
            Object localObject = localt.b();
            a.c.q localq = localt.d();
            if (!bool)
            {
              if ((!y.a(localj, i.a)) && ((bool) || (((localObject instanceof a.c.d)) && ((bool) || ((localq instanceof a.j.g))))))
              {
                a.c.d locald = (a.c.d)localObject;
                a.j.g localg = (a.j.g)localq;
                localg.a(locald, localtb);
              }
              localw.a(localtb, localNode, localj);
              paramAnonymouscb.a(localtb);
            }
          }
        }
      }
    });
  }
  
  private void m()
  {
    super.a(new rd.b_());
    super.a(new cb());
    super.a(new cb.a_());
    super.a(new v());
    super.a(new v.b_());
    super.a(new v.c_());
    super.a(new v.d_());
    super.a(new v.a_());
    super.a(new l.c_());
    super.a(new ce.b_());
    super.a(new a.j.bb.d_());
    super.a(new a.e.b.c.v()
    {
      public void a(a.e.b.c.eb paramAnonymouseb)
        throws a.e.b.c.a
      {
        boolean bool = i.i;
        a.e.b.c.o localo = paramAnonymouseb.d();
        Object localObject = paramAnonymouseb.a();
        if ((bool) || ((localObject instanceof ld)))
        {
          ld localld = (ld)localObject;
          a.e.b.c.cb localcb = localo.d();
          j localj = j.e();
          if (!bool)
          {
            if (localj.a(localld, localo))
            {
              localcb.a(localj.c(), localj.a(), localj.b());
              localj.b(localld, localcb, localo);
            }
          }
          else
          {
            localj.a(localld, localcb, localo);
            localcb.b();
            paramAnonymouseb.a(true);
          }
        }
      }
    });
    super.a(new a.e.b.c.v()
    {
      public void a(a.e.b.c.eb paramAnonymouseb)
        throws a.e.b.c.a
      {
        boolean bool = i.i;
        a.e.b.c.o localo = paramAnonymouseb.d();
        Object localObject = paramAnonymouseb.a();
        if ((bool) || ((localObject instanceof a.j.tb)))
        {
          a.j.tb localtb = (a.j.tb)localObject;
          a.e.b.c.cb localcb = localo.d();
          d locald = d.e();
          if (!bool)
          {
            if (locald.a(localtb, localo))
            {
              localcb.a(locald.c(), locald.a(), locald.b());
              locald.b(localtb, localcb, localo);
            }
          }
          else
          {
            locald.a(localtb, localcb, localo);
            localcb.b();
            paramAnonymouseb.a(true);
          }
        }
      }
    });
    super.a(new a.e.b.c.v()
    {
      public void a(a.e.b.c.eb paramAnonymouseb)
        throws a.e.b.c.a
      {
        boolean bool = i.i;
        a.e.b.c.o localo = paramAnonymouseb.d();
        Object localObject = paramAnonymouseb.a();
        if ((bool) || ((localObject instanceof ld)))
        {
          ld localld = (ld)localObject;
          a.e.b.c.cb localcb = localo.d();
          Iterator localIterator = lb.this.q.iterator();
          while (localIterator.hasNext())
          {
            eb localeb = (eb)localIterator.next();
            if (localeb.a(localld, localo))
            {
              localcb.a(localeb.c(), localeb.a(), localeb.b());
              localeb.b(localld, localcb, localo);
              localeb.a(localld, localcb, localo);
              localcb.b();
              paramAnonymouseb.a(true);
            }
          }
        }
      }
    });
    super.a(new a.e.b.c.v()
    {
      public void a(a.e.b.c.eb paramAnonymouseb)
        throws a.e.b.c.a
      {
        boolean bool = i.i;
        a.e.b.c.o localo = paramAnonymouseb.d();
        Object localObject = paramAnonymouseb.a();
        if ((bool) || ((localObject instanceof a.j.tb)))
        {
          a.j.tb localtb = (a.j.tb)localObject;
          a.e.b.c.cb localcb = localo.d();
          Iterator localIterator = lb.this.r.iterator();
          while (localIterator.hasNext())
          {
            w localw = (w)localIterator.next();
            if (localw.a(localtb, localo))
            {
              localcb.a(localw.c(), localw.a(), localw.b());
              localw.b(localtb, localcb, localo);
              localw.a(localtb, localcb, localo);
              localcb.b();
              paramAnonymouseb.a(true);
            }
          }
        }
      }
    });
  }
  
  protected void c(a.c.q paramq, a.e.b.b.u paramu)
  {
    boolean bool = i.i;
    super.c(paramq, paramu);
    if (!bool) {}
    paramu.a(x == null ? (lb.x = a("a.e.b.a.jb")) : x, new ab_(null));
    if (!bool) {}
    paramu.a(y == null ? (lb.y = a("a.e.b.a.k$a_")) : y, new k.a_()
    {
      public void a(Node paramAnonymousNode, md paramAnonymousmd, a.e.b.b.t paramAnonymoust)
      {
        boolean bool = i.i;
        if ((bool) || (paramAnonymousNode.getNodeType() == 1))
        {
          String str = ((Element)paramAnonymousNode).getAttribute("configuration");
          if (str.length() > 0)
          {
            md.f_ localf_ = md.e();
            if (!bool)
            {
              if (!localf_.d().contains(str)) {
                a.i.n.a("Configuration " + str + " not found, substituting default configuration");
              }
            }
            else
            {
              localf_.a(str, localf_.a());
              paramAnonymousmd.e(str);
            }
          }
        }
      }
    });
    if (!bool) {}
    paramu.a(z == null ? (lb.z = a("a.e.b.a.e$a_")) : z, new e.a_()
    {
      public void a(Node paramAnonymousNode, wb paramAnonymouswb, a.e.b.b.t paramAnonymoust)
      {
        boolean bool = i.i;
        if ((bool) || (paramAnonymousNode.getNodeType() == 1))
        {
          String str = ((Element)paramAnonymousNode).getAttribute("configuration");
          if (str.length() > 0)
          {
            wb.h_ localh_ = wb.Z();
            if (!bool)
            {
              if (!localh_.d().contains(str)) {
                a.i.n.a("Configuration " + str + " not found, substituting default configuration");
              }
            }
            else
            {
              localh_.a(str, localh_.a());
              paramAnonymouswb.d(str);
            }
          }
        }
      }
    });
    if (!bool) {}
    paramu.a(A == null ? (lb.A = a("a.e.b.a.ob$a_")) : A, new ob.a_()
    {
      public void a(jd paramAnonymousjd, Node paramAnonymousNode, a.e.b.b.t paramAnonymoust)
      {
        boolean bool = i.i;
        if ((bool) || (paramAnonymousNode.getNodeType() == 1))
        {
          String str = ((Element)paramAnonymousNode).getAttribute("configuration");
          if (str.length() > 0)
          {
            jd.e_ locale_ = jd.n();
            if (!bool)
            {
              if (!locale_.b().contains(str)) {
                a.i.n.a("Configuration " + str + " not found, substituting default configuration");
              }
            }
            else
            {
              locale_.a(str, locale_.a());
              paramAnonymousjd.a(str);
            }
          }
        }
      }
    });
    if (!bool) {}
    paramu.a(B == null ? (lb.B = a("a.e.b.a.u$c_")) : B, new u.c_()
    {
      public void a(ig paramAnonymousig, Node paramAnonymousNode, a.e.b.b.t paramAnonymoust)
      {
        boolean bool = i.i;
        if ((bool) || (paramAnonymousNode.getNodeType() == 1))
        {
          String str = ((Element)paramAnonymousNode).getAttribute("configuration");
          if (str.length() > 0)
          {
            hg.c_ localc_ = ig.pb();
            if (!bool)
            {
              if (!localc_.b().contains(str)) {
                a.i.n.a("Configuration " + str + " not found, substituting default configuration");
              }
            }
            else
            {
              localc_.a(str, localc_.a());
              paramAnonymousig.c(str);
            }
          }
        }
      }
    });
    if (!bool) {}
    paramu.a(C == null ? (lb.C = a("a.e.b.a.bb$c_")) : C, new bb.c_()
    {
      public void a(jg paramAnonymousjg, Node paramAnonymousNode, a.e.b.b.t paramAnonymoust)
      {
        boolean bool = i.i;
        if ((bool) || (paramAnonymousNode.getNodeType() == 1))
        {
          String str = ((Element)paramAnonymousNode).getAttribute("configuration");
          if (str.length() > 0)
          {
            hg.c_ localc_ = jg.b();
            if (!bool)
            {
              if (!localc_.b().contains(str)) {
                a.i.n.a("Configuration " + str + " not found, substituting default configuration");
              }
            }
            else
            {
              localc_.a(str, localc_.a());
              paramAnonymousjg.c(str);
            }
          }
        }
      }
    });
    if (!bool) {}
    paramu.a(u == null ? (lb.u = a("a.e.b.l")) : u, new cb_(null));
  }
  
  protected void a(a.c.q paramq, a.e.b.c.p paramp)
  {
    super.a(paramq, paramp);
    paramp.c().a(new a.e.b.c.z()
    {
      public void c(a.e.b.c.fb paramAnonymousfb)
      {
        boolean bool = i.i;
        a.c.q localq = paramAnonymousfb.a().e();
        a.j.a.j localj = a.j.a.j.a(localq);
        if ((bool) || (localj != null))
        {
          Object localObject = paramAnonymousfb.a().b();
          if ((bool) || ((localObject instanceof a.c.e)))
          {
            a.c.e locale = (a.c.e)localObject;
            if (!bool) {
              if (localj.l(locale)) {
                paramAnonymousfb.a().d().c("yfiles.foldertype", "folder");
              }
            }
            if ((bool) || ((i.h != 0) && (localj.m(locale)))) {
              paramAnonymousfb.a().d().c("yfiles.foldertype", "group");
            }
          }
        }
      }
    });
    if (!i.i) {}
    paramp.a(D == null ? (lb.D = a("a.e.b.c.u")) : D, new db());
  }
  
  protected void a(a.c.q paramq, a.e.b.b.u paramu)
  {
    super.a(paramq, paramu);
    paramu.c().a(new a.e.b.b.z()
    {
      public void c(a.e.b.b.db paramAnonymousdb)
      {
        boolean bool = i.i;
        if (!bool) {}
        a.e.b.b.fb localfb = (a.e.b.b.fb)paramAnonymousdb.a().a(lb.E == null ? (lb.E = lb.a("a.e.b.b.fb")) : lb.E);
        if (localfb != null)
        {
          Element localElement = paramAnonymousdb.b();
          String str = localElement.getAttribute("yfiles.foldertype");
          if (!bool) {
            if ("folder".equals(str)) {
              localfb.put("y.io.graphml.input.CreationPropertyKeys.IS_FOLDER_NODE", Boolean.TRUE);
            }
          }
          if ((bool) || ((i.h != 0) && ((bool) || ("group".equals(str))))) {
            localfb.put("y.io.graphml.input.CreationPropertyKeys.IS_GROUP_NODE", Boolean.TRUE);
          }
        }
      }
      
      public void d(a.e.b.b.db paramAnonymousdb)
      {
        boolean bool = i.i;
        int i = i.h;
        a.e.b.b.t localt = paramAnonymousdb.a();
        if ((bool) || ((localt.d() instanceof a.j.g)))
        {
          if (!bool) {}
          a.e.b.b.fb localfb = (a.e.b.b.fb)localt.a(lb.E == null ? (lb.E = lb.a("a.e.b.b.fb")) : lb.E);
          if ((bool) || (localfb != null))
          {
            Object localObject = localfb.get("y.io.graphml.input.CreationPropertyKeys.NODE_PORTS");
            if ((bool) || ((localObject instanceof Collection)))
            {
              Collection localCollection = (Collection)localObject;
              if (!localCollection.isEmpty())
              {
                a.j.g localg = (a.j.g)localt.d();
                a.c.e locale = (a.c.e)localt.b();
                Iterator localIterator = localCollection.iterator();
                do
                {
                  do
                  {
                    jd localjd;
                    do
                    {
                      if (!localIterator.hasNext()) {
                        break;
                      }
                      localjd = (jd)localIterator.next();
                    } while (localjd.b() != null);
                    localg.w(locale).a(localjd);
                  } while (bool);
                } while (i == 0);
              }
            }
          }
        }
      }
      
      public void f(a.e.b.b.db paramAnonymousdb)
      {
        boolean bool = i.i;
        int i = i.h;
        a.e.b.b.t localt = paramAnonymousdb.a();
        if ((bool) || ((localt.d() instanceof a.j.g)))
        {
          if (!bool) {}
          a.e.b.b.fb localfb = (a.e.b.b.fb)localt.a(lb.E == null ? (lb.E = lb.a("a.e.b.b.fb")) : lb.E);
          if (localfb != null)
          {
            a.j.g localg = (a.j.g)localt.d();
            a.c.d locald = (a.c.d)localt.b();
            a.j.a.j localj = localg.K();
            Object localObject1 = localfb.get("y.io.graphml.input.CreationPropertyKeys.SOURCE_PORT");
            if (!bool) {
              if ((localObject1 instanceof jd))
              {
                if (!bool) {
                  if (localj != null)
                  {
                    if (bool) {
                      break label189;
                    }
                    if (localj.e(locald))
                    {
                      if (bool) {
                        break label206;
                      }
                      if (localj.b(locald) != locald.e()) {
                        break label192;
                      }
                    }
                  }
                }
                if (bool) {
                  break label270;
                }
                ((jd)localObject1).a(localg.t(locald));
                if (i != 0)
                {
                  label189:
                  label192:
                  label206:
                  Object localObject3 = (Map)localj.d(locald).a("HierarchyManager.InterEdgeData.SOURCE_PORT");
                  if (!bool) {
                    if (localObject3 == null)
                    {
                      localObject3 = new HashMap();
                      localj.d(locald).a("HierarchyManager.InterEdgeData.SOURCE_PORT", localObject3);
                    }
                  }
                  ((Map)localObject3).put(localj.b(locald), localObject1);
                }
              }
            }
            label270:
            Object localObject2 = localfb.get("y.io.graphml.input.CreationPropertyKeys.TARGET_PORT");
            if ((localObject2 instanceof jd))
            {
              if (!bool) {
                if (localj != null)
                {
                  if (bool) {
                    break label347;
                  }
                  if (localj.e(locald))
                  {
                    if (bool) {
                      break label364;
                    }
                    if (localj.c(locald) != locald.f()) {
                      break label350;
                    }
                  }
                }
              }
              if (!bool)
              {
                ((jd)localObject2).c(localg.t(locald));
                label347:
                if (i == 0) {}
              }
              else
              {
                label350:
                label364:
                Object localObject4 = (Map)localj.d(locald).a("HierarchyManager.InterEdgeData.TARGET_PORT");
                if (!bool) {
                  if (localObject4 == null)
                  {
                    localObject4 = new HashMap();
                    localj.d(locald).a("HierarchyManager.InterEdgeData.TARGET_PORT", localObject4);
                  }
                }
                ((Map)localObject4).put(localj.c(locald), localObject2);
              }
            }
          }
        }
      }
    });
  }
  
  protected a.e.b.b.q a(a.e.b.b.u paramu, a.c.q paramq)
  {
    if ((i.i) || ((paramq instanceof a.j.g)))
    {
      if (a.j.a.j.a(paramq) != null) {
        return new z();
      }
      return new x();
    }
    return super.a(paramu, paramq);
  }
  
  protected void n()
  {
    a(new m());
    a(new l());
    a(new r());
    a(new k());
    a(new o());
    a(new p());
    a(new n());
    a(new q());
    a(new b());
    a(new c());
    a(new h());
    a(new g());
    a(new e());
    a(new f());
  }
  
  protected void c(a.c.q paramq, a.e.b.c.p paramp)
  {
    super.c(paramq, paramp);
    paramp.a("y.io.graphml.output.SerializationProperties.IGNORE_UNKNOWN_REALIZERS", Boolean.TRUE);
  }
  
  protected void f(a.c.q paramq, a.e.b.b.u paramu)
  {
    super.f(paramq, paramu);
    paramu.a("y.io.graphml.input.DeserializationProperties.IGNORE_UNKNOWN_REALIZERS", Boolean.TRUE);
    paramu.a("y.io.graphml.input.DeserializationProperties.IGNORE_RESOURCE_ERRORS", Boolean.TRUE);
    paramu.a("y.io.graphml.graph2d.PostprocessorInputHandler.IGNORE_POSTPROCESSOR_ERRORS", Boolean.TRUE);
  }
  
  public void a(eb parameb)
  {
    if (parameb == null) {
      throw new IllegalArgumentException("serializer may not be null");
    }
    this.q.add(0, parameb);
  }
  
  public void a(w paramw)
  {
    if (paramw == null) {
      throw new IllegalArgumentException("serializer may not be null");
    }
    this.r.add(0, paramw);
  }
  
  public void b(eb parameb)
  {
    this.q.remove(parameb);
  }
  
  public void b(w paramw)
  {
    this.r.remove(paramw);
  }
  
  static Class a(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
  
  private static class cb_
    implements a.e.b.l
  {
    private cb_() {}
    
    public String a(String paramString, a.e.b.c.o paramo)
    {
      return a.e.r.c(paramString);
    }
    
    public String a(String paramString, a.e.b.b.t paramt)
    {
      return a.e.r.d(paramString);
    }
    
    cb_(lb.22 param22)
    {
      this();
    }
  }
  
  static final class eb_
    implements a.e.b.b.n
  {
    private static final eb_ a = new eb_();
    private GraphicsEnvironment b;
    private GraphicsConfiguration c;
    
    public static eb_ a()
    {
      return a;
    }
    
    /* Error */
    protected Object a(Node paramNode, a.e.b.b.t paramt)
      throws a.e.b.b.a
    {
      // Byte code:
      //   0: getstatic 197	a/e/b/a/i:i	Z
      //   3: istore 13
      //   5: aload_1
      //   6: iload 13
      //   8: ifne +9 -> 17
      //   11: ifnonnull +5 -> 16
      //   14: aconst_null
      //   15: areturn
      //   16: aload_1
      //   17: invokeinterface 3 1 0
      //   22: astore_3
      //   23: aload_3
      //   24: invokestatic 4	a/e/b/d:a	(Ljava/lang/String;)[B
      //   27: astore 4
      //   29: aconst_null
      //   30: astore 5
      //   32: new 5	java/io/ByteArrayInputStream
      //   35: dup
      //   36: aload 4
      //   38: invokespecial 6	java/io/ByteArrayInputStream:<init>	([B)V
      //   41: astore 5
      //   43: aload 5
      //   45: invokestatic 7	javax/imageio/ImageIO:read	(Ljava/io/InputStream;)Ljava/awt/image/BufferedImage;
      //   48: astore 6
      //   50: invokestatic 8	java/awt/GraphicsEnvironment:isHeadless	()Z
      //   53: iload 13
      //   55: ifne +22 -> 77
      //   58: ifeq +13 -> 71
      //   61: aload 6
      //   63: astore 7
      //   65: jsr +171 -> 236
      //   68: aload 7
      //   70: areturn
      //   71: aload 6
      //   73: aconst_null
      //   74: invokevirtual 9	java/awt/image/BufferedImage:getWidth	(Ljava/awt/image/ImageObserver;)I
      //   77: istore 7
      //   79: aload 6
      //   81: aconst_null
      //   82: invokevirtual 10	java/awt/image/BufferedImage:getHeight	(Ljava/awt/image/ImageObserver;)I
      //   85: istore 8
      //   87: aload_0
      //   88: iload 7
      //   90: iload 8
      //   92: aload 6
      //   94: invokevirtual 11	a/e/b/a/lb$eb_:a	(IILjava/awt/image/BufferedImage;)Ljava/awt/Image;
      //   97: astore 9
      //   99: jsr +137 -> 236
      //   102: aload 9
      //   104: areturn
      //   105: astore 7
      //   107: new 13	java/lang/StringBuffer
      //   110: dup
      //   111: invokespecial 14	java/lang/StringBuffer:<init>	()V
      //   114: ldc 15
      //   116: invokevirtual 16	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
      //   119: aload 7
      //   121: invokevirtual 17	java/lang/Exception:getMessage	()Ljava/lang/String;
      //   124: invokevirtual 16	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
      //   127: invokevirtual 18	java/lang/StringBuffer:toString	()Ljava/lang/String;
      //   130: invokestatic 19	a/i/n:a	(Ljava/lang/Object;)V
      //   133: aload 6
      //   135: astore 8
      //   137: jsr +99 -> 236
      //   140: aload 8
      //   142: areturn
      //   143: astore 6
      //   145: new 13	java/lang/StringBuffer
      //   148: dup
      //   149: invokespecial 14	java/lang/StringBuffer:<init>	()V
      //   152: ldc 21
      //   154: invokevirtual 16	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
      //   157: aload 6
      //   159: invokevirtual 22	java/io/IOException:getMessage	()Ljava/lang/String;
      //   162: invokevirtual 16	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
      //   165: invokevirtual 18	java/lang/StringBuffer:toString	()Ljava/lang/String;
      //   168: astore 7
      //   170: iload 13
      //   172: ifne +35 -> 207
      //   175: aload_2
      //   176: ldc 23
      //   178: invokestatic 24	a/e/b/a/y:a	(La/e/b/b/t;Ljava/lang/Object;)Z
      //   181: ifeq +35 -> 216
      //   184: new 13	java/lang/StringBuffer
      //   187: dup
      //   188: invokespecial 14	java/lang/StringBuffer:<init>	()V
      //   191: aload 7
      //   193: invokevirtual 16	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
      //   196: ldc 25
      //   198: invokevirtual 16	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
      //   201: invokevirtual 18	java/lang/StringBuffer:toString	()Ljava/lang/String;
      //   204: invokestatic 19	a/i/n:a	(Ljava/lang/Object;)V
      //   207: aconst_null
      //   208: astore 8
      //   210: jsr +26 -> 236
      //   213: aload 8
      //   215: areturn
      //   216: new 26	a/e/b/b/a
      //   219: dup
      //   220: aload 7
      //   222: aload 6
      //   224: invokespecial 27	a/e/b/b/a:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
      //   227: athrow
      //   228: astore 10
      //   230: jsr +6 -> 236
      //   233: aload 10
      //   235: athrow
      //   236: astore 11
      //   238: aload 5
      //   240: iload 13
      //   242: ifne +8 -> 250
      //   245: ifnull +13 -> 258
      //   248: aload 5
      //   250: invokevirtual 28	java/io/ByteArrayInputStream:close	()V
      //   253: goto +5 -> 258
      //   256: astore 12
      //   258: ret 11
      // Local variable table:
      //   start	length	slot	name	signature
      //   0	260	0	this	eb_
      //   0	260	1	paramNode	Node
      //   0	260	2	paramt	a.e.b.b.t
      //   22	2	3	str1	String
      //   27	10	4	arrayOfByte	byte[]
      //   30	219	5	localByteArrayInputStream	java.io.ByteArrayInputStream
      //   48	86	6	localBufferedImage1	BufferedImage
      //   143	80	6	localIOException1	IOException
      //   63	6	7	localBufferedImage2	BufferedImage
      //   77	12	7	i	int
      //   105	15	7	localException	java.lang.Exception
      //   168	53	7	str2	String
      //   85	6	8	j	int
      //   135	79	8	localBufferedImage3	BufferedImage
      //   97	6	9	localImage	Image
      //   228	6	10	localObject1	Object
      //   236	1	11	localObject2	Object
      //   256	1	12	localIOException2	IOException
      //   3	238	13	bool	boolean
      // Exception table:
      //   from	to	target	type
      //   71	99	105	java/lang/Exception
      //   32	68	143	java/io/IOException
      //   71	102	143	java/io/IOException
      //   105	140	143	java/io/IOException
      //   32	68	228	finally
      //   71	102	228	finally
      //   105	140	228	finally
      //   143	213	228	finally
      //   216	233	228	finally
      //   248	253	256	java/io/IOException
    }
    
    protected Image a(int paramInt1, int paramInt2, BufferedImage paramBufferedImage)
    {
      boolean bool = i.i;
      GraphicsEnvironment localGraphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
      if (!bool)
      {
        if (this.b == localGraphicsEnvironment)
        {
          if (bool) {
            break label64;
          }
          if (this.c != null) {}
        }
        else
        {
          this.b = localGraphicsEnvironment;
        }
      }
      else
      {
        localObject1 = this.b.getDefaultScreenDevice();
        this.c = ((GraphicsDevice)localObject1).getDefaultConfiguration();
      }
      label64:
      Object localObject1 = this.c.createCompatibleImage(paramInt1, paramInt2, paramBufferedImage.getColorModel().getTransparency());
      Graphics2D localGraphics2D = (Graphics2D)((BufferedImage)localObject1).getGraphics();
      try
      {
        localGraphics2D.setBackground(new Color(255, 255, 255, 0));
        localGraphics2D.clearRect(0, 0, paramInt1, paramInt2);
        localGraphics2D.drawImage(paramBufferedImage, 0, 0, null);
      }
      finally
      {
        localGraphics2D.dispose();
      }
      return localObject1;
    }
    
    public void a(a.e.b.b.cb paramcb)
      throws a.e.b.b.a
    {
      Node localNode = paramcb.e();
      if (localNode.getNodeType() == 3) {
        paramcb.a(a(localNode, paramcb.d()));
      }
    }
  }
  
  static final class y_
    implements a.e.b.c.v
  {
    private static final y_ a = new y_();
    
    public static y_ a()
    {
      return a;
    }
    
    protected void a(Image paramImage, a.e.b.c.cb paramcb, a.e.b.c.o paramo)
      throws a.e.b.c.b
    {
      boolean bool = i.i;
      String str1 = null;
      String str2 = "png";
      ImageWriter localImageWriter = (ImageWriter)ImageIO.getImageWritersBySuffix(str2).next();
      if (localImageWriter != null)
      {
        BufferedImage localBufferedImage = new BufferedImage(paramImage.getWidth(null), paramImage.getHeight(null), 2);
        Graphics2D localGraphics2D = localBufferedImage.createGraphics();
        localGraphics2D.drawImage(paramImage, 0, 0, null);
        localGraphics2D.dispose();
        ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream();
        ImageOutputStream localImageOutputStream = null;
        try
        {
          localImageOutputStream = ImageIO.createImageOutputStream(localByteArrayOutputStream);
          localImageWriter.setOutput(localImageOutputStream);
          localImageWriter.write(localBufferedImage);
          str1 = a.e.b.d.a(localByteArrayOutputStream.toByteArray());
        }
        catch (IOException localIOException1)
        {
          if (!bool)
          {
            if (y.a(paramo, "y.io.graphml.output.SerializationProperties.IGNORE_UNKNOWN_REALIZERS")) {
              a.i.n.a("Unable to encode image resource: " + localIOException1.getMessage());
            }
          }
          else
          {
            str1 = null;
            break label183;
          }
          throw new a.e.b.c.b("Error serializing image content", localIOException1);
        }
        finally
        {
          try
          {
            label183:
            if ((bool) || (localImageOutputStream != null)) {
              localImageOutputStream.close();
            }
          }
          catch (IOException localIOException2) {}
        }
      }
      if (str1 != null) {
        paramcb.c(str1);
      }
    }
    
    public void a(a.e.b.c.eb parameb)
      throws a.e.b.c.b
    {
      Object localObject = parameb.a();
      if (!i.i)
      {
        if ((localObject instanceof Image)) {
          a((Image)localObject, parameb.e(), parameb.d());
        }
      }
      else {
        parameb.a(true);
      }
    }
  }
  
  private static class z_
    implements a.e.b.b.v
  {
    public static final String a = "useEmbeddedResources";
    
    private z_() {}
    
    public boolean a(Element paramElement)
    {
      boolean bool = i.i;
      int j = i.h;
      NamedNodeMap localNamedNodeMap = paramElement.getAttributes();
      String str = null;
      int i = 0;
      do
      {
        if (i >= localNamedNodeMap.getLength()) {
          break;
        }
        Node localNode = localNamedNodeMap.item(i);
        if (j != 0) {
          break label108;
        }
        if ("yfiles.type".equals(localNode.getNodeName().toLowerCase())) {
          str = localNode.getNodeValue();
        }
        i++;
      } while (j == 0);
      return ((bool) || (str != null)) && ((bool) || ("resources".equals(str)));
    }
    
    public a.e.b.b.ab a()
    {
      return a.e.b.b.ab.d;
    }
    
    public void a(a.e.b.b.t paramt, Node paramNode)
    {
      boolean bool = i.i;
      int k = i.h;
      if (!bool) {}
      jb localjb = (jb)paramt.a(lb.x == null ? (lb.x = lb.a("a.e.b.a.jb")) : lb.x);
      if (localjb != null)
      {
        Object localObject = null;
        for (int i = 0; i < paramNode.getChildNodes().getLength(); i++)
        {
          Node localNode1 = paramNode.getChildNodes().item(i);
          if ((bool) || ((!bool) && (k != 0))) {
            return;
          }
          if (((bool) || (localNode1.getNodeType() == 1)) && ((bool) || (("Resources".equals(localNode1.getLocalName())) && ("http://www.yworks.com/xml/graphml".equals(localNode1.getNamespaceURI())))))
          {
            localObject = localNode1;
            break;
          }
        }
        NodeList localNodeList = null;
        if ((bool) || (localObject != null))
        {
          localNodeList = localObject.getChildNodes();
          int j = 0;
          do
          {
            if (j >= localNodeList.getLength()) {
              break;
            }
            Node localNode2 = localNodeList.item(j);
            if (!bool)
            {
              if (localNode2.getNodeType() == 1)
              {
                if (bool) {
                  continue;
                }
                if ("Resource".equals(localNode2.getLocalName()))
                {
                  if (bool) {
                    continue;
                  }
                  if ("http://www.yworks.com/xml/graphml".equals(localNode2.getNamespaceURI()))
                  {
                    NamedNodeMap localNamedNodeMap = localNode2.getAttributes();
                    String str = localNamedNodeMap.getNamedItem("id").getNodeValue();
                    localjb.a(str, localNode2);
                  }
                }
              }
              j++;
            }
          } while (k == 0);
        }
      }
    }
    
    public void a(a.e.b.b.t paramt) {}
    
    z_(lb.22 param22)
    {
      this();
    }
  }
  
  private static class bb_
    implements s
  {
    private bb_() {}
    
    public a.e.b.c.ab a()
    {
      return a.e.b.c.ab.d;
    }
    
    public Collection b()
    {
      ArrayList localArrayList = new ArrayList();
      localArrayList.add(new a.e.b.c.q("yfiles.type", null, "resources"));
      localArrayList.add(new a.e.b.c.q("for", null, "graphml"));
      return localArrayList;
    }
    
    public Collection c()
    {
      return new ArrayList();
    }
    
    public boolean a(a.e.b.c.o paramo)
    {
      return false;
    }
    
    public void b(a.e.b.c.o paramo)
      throws a.e.b.c.a
    {
      boolean bool = i.i;
      a.e.b.c.cb localcb = paramo.d();
      localcb.a("Resources", "http://www.yworks.com/xml/graphml");
      if (!bool) {}
      kb localkb = (kb)paramo.a(lb.t == null ? (lb.t = lb.a("a.e.b.a.kb")) : lb.t);
      if (!bool)
      {
        if (localkb != null) {
          localkb.a(paramo, localcb);
        }
        localcb.b();
      }
    }
    
    public void c(a.e.b.c.o paramo) {}
    
    bb_(lb.22 param22)
    {
      this();
    }
  }
  
  private static class ab_
    implements jb
  {
    private HashMap a = new HashMap();
    
    private ab_() {}
    
    public Object a(String paramString, a.e.b.b.n paramn, Class paramClass, a.e.b.b.t paramt)
      throws a.e.b.b.a
    {
      boolean bool = i.i;
      a_ locala_ = (a_)this.a.get(paramString);
      if (!bool) {
        if (locala_ == null) {
          return null;
        }
      }
      if (!bool) {
        if (!locala_.c)
        {
          Node localNode = a.e.b.b.bb.a(locala_.b);
          if ((bool) || (localNode == null))
          {
            locala_.a = null;
            return null;
          }
          if (!bool) {
            if (paramn != null)
            {
              a.e.b.b.cb localcb = new a.e.b.b.cb(this, paramt, localNode, paramClass);
              paramn.a(localcb);
              if (bool) {
                break label163;
              }
              if (!localcb.c()) {
                break label157;
              }
              locala_.a = localcb.b();
              if (bool) {
                break label163;
              }
              if (i.h == 0) {
                break label157;
              }
            }
          }
          locala_.a = paramt.a(paramt, localNode, paramClass);
          label157:
          label163:
          locala_.c = true;
        }
      }
      return locala_.a;
    }
    
    public void a(String paramString, Node paramNode)
    {
      a_ locala_ = new a_(null);
      locala_.b = paramNode;
      this.a.put(paramString, locala_);
    }
    
    ab_(lb.22 param22)
    {
      this();
    }
    
    private static class a_
    {
      private Object a;
      private Node b;
      private boolean c;
      
      private a_() {}
      
      a_(lb.22 param22)
      {
        this();
      }
    }
  }
  
  private static class db_
    implements kb
  {
    private int a;
    private HashMap b = new HashMap();
    private List c = new LinkedList();
    
    private db_() {}
    
    public ib a(Object paramObject, a.e.b.c.v paramv)
    {
      return a(paramObject, paramv, null);
    }
    
    public ib a(Object paramObject, a.e.b.c.v paramv, String paramString)
    {
      if (!i.i)
      {
        if (a(paramObject)) {
          return (ib)this.b.get(paramObject);
        }
        this.a += 1;
      }
      String str = String.valueOf(this.a);
      a_ locala_ = new a_(str, paramString, paramv, paramObject);
      this.b.put(paramObject, locala_);
      this.c.add(locala_);
      return locala_;
    }
    
    public Collection a()
    {
      return this.c;
    }
    
    public boolean a(Object paramObject)
    {
      return this.b.containsKey(paramObject);
    }
    
    public void a(a.e.b.c.o paramo, a.e.b.c.cb paramcb)
      throws a.e.b.c.a
    {
      boolean bool = i.i;
      int j = i.h;
      do
      {
        int i = 0;
        ListIterator localListIterator;
        while (!localListIterator.hasNext())
        {
          if (i >= this.c.size()) {
            break;
          }
          LinkedList localLinkedList = new LinkedList(this.c);
          localListIterator = localLinkedList.listIterator(i);
        }
        ib localib = (ib)localListIterator.next();
        a.e.b.c.v localv = localib.c();
        paramcb.a("Resource", "http://www.yworks.com/xml/graphml");
        paramcb.c("id", localib.b());
        String str = localib.a();
        if (j != 0) {
          break;
        }
        if (((bool) || (str != null)) && (str.length() > 0)) {
          paramcb.c("type", str);
        }
        if ((bool) || (localv != null))
        {
          localv.a(new a.e.b.c.eb(this, paramo, localib.d()));
          if (bool) {
            continue;
          }
          if (j == 0) {}
        }
        else
        {
          paramo.b(localib.d());
        }
        paramcb.b();
        i++;
      } while (j == 0);
    }
    
    db_(lb.22 param22)
    {
      this();
    }
    
    private static class a_
      implements ib
    {
      private String a;
      private a.e.b.c.v b;
      private String c;
      private Object e;
      
      public String a()
      {
        return this.c;
      }
      
      public a_(String paramString1, String paramString2, a.e.b.c.v paramv, Object paramObject)
      {
        this.e = paramObject;
        this.a = paramString1;
        this.b = paramv;
        this.c = paramString2;
      }
      
      public String b()
      {
        return this.a;
      }
      
      public a.e.b.c.v c()
      {
        return this.b;
      }
      
      public Object d()
      {
        return this.e;
      }
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.e.b.a.lb

 * JD-Core Version:    0.7.0.1

 */